
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="robots" content="index,follow" />
    <meta name="creator" content="rfchandler version 0.2" />
      <meta name="citation_author" content="Z. Shelby"/>
      <meta name="citation_publication_date" content="August, 2012"/>
      <meta name="citation_title" content="Constrained RESTful Environments (CoRE) Link Format"/>
      <meta name="citation_doi" content="10.17487/RFC6690"/>
      <meta name="citation_issn" content="2070-1721"/>
      <meta name="citation_technical_report_number" content="rfc6690">
      <meta name="citation_pdf_url" content="https://www.rfc-editor.org/rfc/pdfrfc/rfc6690.txt.pdf"/>
<title>RFC 6690: Constrained RESTful Environments (CoRE) Link Format</title>    
        

        <style type="text/css">
	@media only screen 
	  and (min-width: 992px)
	  and (max-width: 1199px) {
	    body { font-size: 14pt; }
            div.content { width: 96ex; margin: 0 auto; }
        }
	@media only screen 
	  and (min-width: 768px)
	  and (max-width: 991px) {
            body { font-size: 14pt; }
            div.content { width: 96ex; margin: 0 auto; }
        }
	@media only screen 
	  and (min-width: 480px)
	  and (max-width: 767px) {
            body { font-size: 11pt; }
            div.content { width: 96ex; margin: 0 auto; }
        }
	@media only screen 
	  and (max-width: 479px) {
            body { font-size: 8pt; }
            div.content { width: 96ex; margin: 0 auto; }
        }
	@media only screen 
	  and (min-device-width : 375px) 
	  and (max-device-width : 667px) {
            body { font-size: 9.5pt; }
            div.content { width: 96ex; margin: 0; }
        }
	@media only screen 
	  and (min-device-width: 1200px) {
            body { font-size: 10pt; margin: 0 4em; }
            div.content { width: 96ex; margin: 0; }
        }
        h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
	    font-weight: bold;
            line-height: 0pt;
            display: inline;
            white-space: pre;
            font-family: monospace;
            font-size: 1em;
	    font-weight: bold;
        }
        pre {
            font-size: 1em;
            margin-top: 0px;
            margin-bottom: 0px;
        }
	.pre {
	    white-space: pre;
	    font-family: monospace;
	}
	.header{
	    font-weight: bold;
	}
        .newpage {
            page-break-before: always;
        }
        .invisible {
            text-decoration: none;
            color: white;
        }
        a.selflink {
          color: black;
          text-decoration: none;
        }
        @media print {
            body {
                font-family: monospace;
                font-size: 10.5pt;
            }
            h1, h2, h3, h4, h5, h6 {
                font-size: 1em;
            }
        
            a:link, a:visited {
                color: inherit;
                text-decoration: none;
            }
            .noprint {
                display: none;
            }
        }
	@media screen {
	    .grey, .grey a:link, .grey a:visited {
		color: #777;
	    }
            .docinfo {
                background-color: #EEE;
            }
            .top {
                border-top: 7px solid #EEE;
            }
            .bgwhite  { background-color: white; }
            .bgred    { background-color: #F44; }
            .bggrey   { background-color: #666; }
            .bgbrown  { background-color: #840; }            
            .bgorange { background-color: #FA0; }
            .bgyellow { background-color: #EE0; }
            .bgmagenta{ background-color: #F4F; }
            .bgblue   { background-color: #66F; }
            .bgcyan   { background-color: #4DD; }
            .bggreen  { background-color: #4F4; }

            .legend   { font-size: 90%; }
            .cplate   { font-size: 70%; border: solid grey 1px; }
	}
    </style>
    <!--[if IE]>
    <style>
    body {
       font-size: 13px;
       margin: 10px 10px;
    }
    </style>
    <![endif]-->    <script type="text/javascript"><!--
    function addHeaderTags() {
        var spans = document.getElementsByTagName("span");
        for (var i=0; i < spans.length; i++) {
            var elem = spans[i];
            if (elem) {
                var level = elem.getAttribute("class");
                if (level == "h1" || level == "h2" || level == "h3" || level == "h4" || level == "h5" || level == "h6") {
                    elem.innerHTML = "<"+level+">"+elem.innerHTML+"</"+level+">";               
                }
            }
        }
    }
    var legend_html = "Colour legend:<br />      <table>         <tr><td>Unknown:</td>                   <td><span class='cplate bgwhite'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>         <tr><td>Draft:</td>                     <td><span class='cplate bgred'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>         <tr><td>Informational:</td>             <td><span class='cplate bgorange'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>         <tr><td>Experimental:</td>              <td><span class='cplate bgyellow'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>         <tr><td>Best Common Practice:</td>      <td><span class='cplate bgmagenta'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>         <tr><td>Proposed Standard:</td>         <td><span class='cplate bgblue'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>         <tr><td>Draft Standard (old designation):</td> <td><span class='cplate bgcyan'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>         <tr><td>Internet Standard:</td>         <td><span class='cplate bggreen'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>         <tr><td>Historic:</td>                  <td><span class='cplate bggrey'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>         <tr><td>Obsolete:</td>                  <td><span class='cplate bgbrown'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>     </table>";
    function showElem(id) {
        var elem = document.getElementById(id);
        elem.innerHTML = eval(id+"_html");
        elem.style.visibility='visible';
    }
    function hideElem(id) {
        var elem = document.getElementById(id);
        elem.style.visibility='hidden';        
        elem.innerHTML = "";
    }
    // -->
    </script></head>
<body>
<span class="pre noprint docinfo">[<a href="https://www.rfc-editor.org" title="RFC Editor">RFC Home</a>] [<a href="/rfc/rfc6690.txt">TEXT</a>|<a href="/rfc/pdfrfc/rfc6690.txt.pdf">PDF</a>|<a href="/rfc/rfc6690.html">HTML</a>] [<a href='https://datatracker.ietf.org/doc/rfc6690' title='IETF Datatracker information for this document'>Tracker</a>] [<a href="https://datatracker.ietf.org/ipr/search/?rfc=6690&amp;submit=rfc" title="IPR disclosures related to this document">IPR</a>] [<a class="boldtext" href="/errata/rfc6690" target="_blank">Errata</a>] [<a href='https://www.rfc-editor.org/info/rfc6690' title='Info page'>Info page</a>]         </span><br/><span class="pre noprint docinfo">                                                                        </span><br /><span class="pre noprint docinfo">                                                       PROPOSED STANDARD</span><br /><span class="pre noprint docinfo">                                                            <span style='color: #C00;'>Errata Exist</span></span><pre>Internet Engineering Task Force (IETF)                         Z. Shelby
Request for Comments: 6690                                     Sensinode
Category: Standards Track                                    August 2012
ISSN: 2070-1721


          <span class="h1">Constrained RESTful Environments (CoRE) Link Format</span>

Abstract

   This specification defines Web Linking using a link format for use by
   constrained web servers to describe hosted resources, their
   attributes, and other relationships between links.  Based on the HTTP
   Link Header field defined in <a href="./rfc5988">RFC 5988</a>, the Constrained RESTful
   Environments (CoRE) Link Format is carried as a payload and is
   assigned an Internet media type.  "RESTful" refers to the
   Representational State Transfer (REST) architecture.  A well-known
   URI is defined as a default entry point for requesting the links
   hosted by a server.

Status of This Memo

   This is an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in <a href="./rfc5741#section-2">Section&nbsp;2 of RFC 5741</a>.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   <a href="http://www.rfc-editor.org/info/rfc6690">http://www.rfc-editor.org/info/rfc6690</a>.

Copyright Notice

   Copyright (c) 2012 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.



<span class="grey">Shelby                       Standards Track                    [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


Table of Contents

   <a href="#section-1">1</a>. Introduction ....................................................<a href="#page-3">3</a>
      <a href="#section-1.1">1.1</a>. Web Linking in CoRE ........................................<a href="#page-3">3</a>
      <a href="#section-1.2">1.2</a>. Use Cases ..................................................<a href="#page-4">4</a>
           <a href="#section-1.2.1">1.2.1</a>. Discovery ...........................................<a href="#page-4">4</a>
           <a href="#section-1.2.2">1.2.2</a>. Resource Collections ................................<a href="#page-5">5</a>
           <a href="#section-1.2.3">1.2.3</a>. Resource Directory ..................................<a href="#page-5">5</a>
      <a href="#section-1.3">1.3</a>. Terminology ................................................<a href="#page-6">6</a>
   <a href="#section-2">2</a>. Link Format .....................................................<a href="#page-6">6</a>
      <a href="#section-2.1">2.1</a>. Target and Context URIs ....................................<a href="#page-8">8</a>
      <a href="#section-2.2">2.2</a>. Link Relations .............................................<a href="#page-8">8</a>
      <a href="#section-2.3">2.3</a>. Use of Anchors .............................................<a href="#page-9">9</a>
   <a href="#section-3">3</a>. CoRE Link Attributes ............................................<a href="#page-9">9</a>
      <a href="#section-3.1">3.1</a>. Resource Type 'rt' Attribute ...............................<a href="#page-9">9</a>
      <a href="#section-3.2">3.2</a>. Interface Description 'if' Attribute ......................<a href="#page-10">10</a>
      <a href="#section-3.3">3.3</a>. Maximum Size Estimate 'sz' Attribute ......................<a href="#page-10">10</a>
   <a href="#section-4">4</a>. Well-Known Interface ...........................................<a href="#page-10">10</a>
      <a href="#section-4.1">4.1</a>. Query Filtering ...........................................<a href="#page-12">12</a>
   <a href="#section-5">5</a>. Examples .......................................................<a href="#page-13">13</a>
   <a href="#section-6">6</a>. Security Considerations ........................................<a href="#page-15">15</a>
   <a href="#section-7">7</a>. IANA Considerations ............................................<a href="#page-16">16</a>
      <a href="#section-7.1">7.1</a>. Well-Known 'core' URI .....................................<a href="#page-16">16</a>
      <a href="#section-7.2">7.2</a>. New 'hosts' Relation Type .................................<a href="#page-16">16</a>
      <a href="#section-7.3">7.3</a>. New 'link-format' Internet Media Type .....................<a href="#page-17">17</a>
      7.4. Constrained RESTful Environments (CoRE) Parameters
           Registry ..................................................<a href="#page-18">18</a>
   <a href="#section-8">8</a>. Acknowledgments ................................................<a href="#page-19">19</a>
   <a href="#section-9">9</a>. References .....................................................<a href="#page-20">20</a>
      <a href="#section-9.1">9.1</a>. Normative References ......................................<a href="#page-20">20</a>
      <a href="#section-9.2">9.2</a>. Informative References ....................................<a href="#page-20">20</a>




















<span class="grey">Shelby                       Standards Track                    [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>.  Introduction</span>

   The Constrained RESTful Environments (CoRE) realizes the
   Representational State Transfer (REST) architecture [<a href="#ref-REST" title="&quot;Architectural Styles and the Design of Network-based Software Architectures&quot;">REST</a>] in a
   suitable form for the most constrained nodes (e.g., 8-bit
   microcontrollers with limited memory) and networks (e.g., IPv6 over
   Low-Power Wireless Personal Area Networks (6LoWPANs) [<a href="./rfc4919" title="&quot;IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs): Overview, Assumptions, Problem Statement, and Goals&quot;">RFC4919</a>]).
   CoRE is aimed at Machine-to-Machine (M2M) applications such as smart
   energy and building automation.

   The discovery of resources hosted by a constrained server is very
   important in machine-to-machine applications where there are no
   humans in the loop and static interfaces result in fragility.  The
   discovery of resources provided by an HTTP [<a href="./rfc2616" title="&quot;Hypertext Transfer Protocol -- HTTP/1.1&quot;">RFC2616</a>] web server is
   typically called "Web Discovery" and the description of relations
   between resources is called "Web Linking" [<a href="./rfc5988" title="&quot;Web Linking&quot;">RFC5988</a>].  In the present
   specification, we refer to the discovery of resources hosted by a
   constrained web server, their attributes, and other resource
   relations as CoRE Resource Discovery.

   The main function of such a discovery mechanism is to provide
   Universal Resource Identifiers (URIs, called links) for the resources
   hosted by the server, complemented by attributes about those
   resources and possible further link relations.  In CoRE, this
   collection of links is carried as a resource of its own (as opposed
   to HTTP headers delivered with a specific resource).  This document
   specifies a link format for use in CoRE Resource Discovery by
   extending the HTTP Link Header format [<a href="./rfc5988" title="&quot;Web Linking&quot;">RFC5988</a>] to describe these
   link descriptions.  The CoRE Link Format is carried as a payload and
   is assigned an Internet media type.  A well-known relative URI
   "/.well-known/core" is defined as a default entry point for
   requesting the list of links about resources hosted by a server and
   thus performing CoRE Resource Discovery.  This specification is
   applicable for use with Constrained Application Protocol (CoAP)
   [<a href="#ref-COAP" title="&quot;Constrained Application Protocol (CoAP)&quot;">COAP</a>], HTTP, or any other suitable web transfer protocol.  The link
   format can also be saved in file format.

<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>.  Web Linking in CoRE</span>

   Technically, the CoRE Link Format is a serialization of a typed link
   as specified in [<a href="./rfc5988" title="&quot;Web Linking&quot;">RFC5988</a>], used to describe relationships between
   resources, so-called "Web Linking".  In this specification, Web
   Linking is extended with specific constrained M2M attributes; links
   are carried as a message payload rather than in an HTTP Link Header
   field, and a default interface is defined to discover resources
   hosted by a server.  This specification also defines a new relation





<span class="grey">Shelby                       Standards Track                    [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


   type "hosts" (from the verb "to host"), which indicates that the
   resource is hosted by the server from which the link document was
   requested.

   In HTTP, the Link Header can be used to carry link information about
   a resource along with an HTTP response.  This works well for the
   typical use case for a web server and browser, where further
   information about a particular resource is useful after accessing it.
   In CoRE, the main use case for Web Linking is the discovery of which
   resources a server hosts in the first place.  Although some resources
   may have further links associated with them, this is expected to be
   an exception.  For that reason, the CoRE Link Format serialization is
   carried as a resource representation of a well-known URI.  The CoRE
   Link Format does reuse the format of the HTTP Link Header
   serialization defined in [<a href="./rfc5988" title="&quot;Web Linking&quot;">RFC5988</a>].

<span class="h3"><a class="selflink" id="section-1.2" href="#section-1.2">1.2</a>.  Use Cases</span>

   Typical use cases for Web Linking on today's web include, e.g.,
   describing the author of a web page or describing relations between
   web pages (next chapter, previous chapter, etc.).  Web Linking can
   also be applied to M2M applications, where typed links are used to
   assist a machine client in finding and understanding how to use
   resources on a server.  In this section a few use cases are described
   for how the CoRE Link Format could be used in M2M applications.  For
   further technical examples, see <a href="#section-5">Section 5</a>.  As there is a large range
   of M2M applications, these use cases are purposely generic.  This
   specification assumes that different deployments or application
   domains will define the appropriate REST Interface Descriptions along
   with Resource Types to make discovery meaningful.

<span class="h4"><a class="selflink" id="section-1.2.1" href="#section-1.2.1">1.2.1</a>.  Discovery</span>

   In M2M applications, for example, home or building automation, there
   is a need for local clients and servers to find and interact with
   each other without human intervention.  The CoRE Link Format can be
   used by servers in such environments to enable Resource Discovery of
   the resources hosted by the server.

   Resource Discovery can be performed either unicast or multicast.
   When a server's IP address is already known, either a priori or
   resolved via the Domain Name System (DNS) [<a href="./rfc1034" title="&quot;Domain names - concepts and facilities&quot;">RFC1034</a>][RFC1035], unicast
   discovery is performed in order to locate the entry point to the
   resource of interest.  In this specification, this is performed using
   a GET to "/.well-known/core" on the server, which returns a payload
   in the CoRE Link Format.  A client would then match the appropriate
   Resource Type, Interface Description, and possible media type




<span class="grey">Shelby                       Standards Track                    [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


   [<a id="ref-RFC2045">RFC2045</a>] for its application.  These attributes may also be included
   in the query string in order to filter the number of links returned
   in a response.

   Multicast Resource Discovery is useful when a client needs to locate
   a resource within a limited scope, and that scope supports IP
   multicast.  A GET request to the appropriate multicast address is
   made for "/.well-known/core".  In order to limit the number and size
   of responses, a query string is recommended with the known
   attributes.  Typically, a resource would be discovered based on its
   Resource Type and/or Interface Description, along with possible
   application-specific attributes.

<span class="h4"><a class="selflink" id="section-1.2.2" href="#section-1.2.2">1.2.2</a>.  Resource Collections</span>

   RESTful designs of M2M interfaces often make use of collections of
   resources.  For example, an index of temperature sensors on a data
   collection node or a list of alarms on a home security controller.
   The CoRE Link Format can be used to make it possible to find the
   entry point to a collection and traverse its members.  The entry
   point of a collection would always be included in "/.well-known/core"
   to enable its discovery.  The members of the collection can be
   defined either through the Interface Description of the resource
   along with a parameter resource for the size of the collection or by
   using the link format to describe each resource in the collection.
   These links could be located under "/.well-known/core" or hosted, for
   example, in the root resource of the collection.

<span class="h4"><a class="selflink" id="section-1.2.3" href="#section-1.2.3">1.2.3</a>.  Resource Directory</span>

   In many deployment scenarios, for example, constrained networks with
   sleeping servers or large M2M deployments with bandwidth limited
   access networks, it makes sense to deploy resource directory entities
   that store links to resources stored on other servers.  Think of this
   as a limited search engine for constrained M2M resources.

   The CoRE Link Format can be used by a server to register resources
   with a resource directory or to allow a resource directory to poll
   for resources.  Resource registration can be achieved by having each
   server POST their resources to "/.well-known/core" on the resource
   directory.  This, in turn, adds links to the resource directory under
   an appropriate resource.  These links can then be discovered by any
   client by making a request to a resource directory lookup interface.








<span class="grey">Shelby                       Standards Track                    [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


<span class="h3"><a class="selflink" id="section-1.3" href="#section-1.3">1.3</a>.  Terminology</span>

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   specification are to be interpreted as described in [<a href="./rfc2119" title="&quot;Key words for use in RFCs to Indicate Requirement Levels&quot;">RFC2119</a>].

   This specification makes use of the Augmented Backus-Naur Form (ABNF)
   [<a href="./rfc5234" title="&quot;Augmented BNF for Syntax Specifications: ABNF&quot;">RFC5234</a>] notation, including the core rules defined in <a href="#appendix-B">Appendix B</a> of
   that document.

   This specification requires readers to be familiar with all the terms
   and concepts that are discussed in [<a href="./rfc5988" title="&quot;Web Linking&quot;">RFC5988</a>] and [<a href="./rfc6454" title="&quot;The Web Origin Concept&quot;">RFC6454</a>].  In
   addition, this specification makes use of the following terminology:

   Web Linking
      A framework for indicating the relationships between web
      resources.

   Link
      Also called "typed links" in [<a href="./rfc5988" title="&quot;Web Linking&quot;">RFC5988</a>].  A link is a typed
      connection between two resources identified by URI and is made up
      of a context URI, a link relation type, a target URI, and optional
      target attributes.

   Link Format
      A particular serialization of typed links.

   CoRE Link Format
      A particular serialization of typed links based on the HTTP Link
      Header field serialization defined in <a href="./rfc5988#section-5">Section&nbsp;5 of [RFC5988]</a> but
      carried as a resource representation with a media type.

   Attribute
      Properly called "Target Attribute" in [<a href="./rfc5988" title="&quot;Web Linking&quot;">RFC5988</a>].  A key/value pair
      that describes the link or its target.

   CoRE Resource Discovery
      When a client discovers the list of resources hosted by a server,
      their attributes, and other link relations by accessing
      "/.well-known/core".

<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>.  Link Format</span>

   The CoRE Link Format extends the HTTP Link Header field specified in
   [<a href="./rfc5988" title="&quot;Web Linking&quot;">RFC5988</a>].  The format does not require special XML or binary
   parsing, is fairly compact, and is extensible -- all important
   characteristics for CoRE.  It should be noted that this link format
   is just one serialization of typed links defined in [<a href="./rfc5988" title="&quot;Web Linking&quot;">RFC5988</a>]; others



<span class="grey">Shelby                       Standards Track                    [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


   include HTML links, Atom feed links [<a href="./rfc4287" title="&quot;The Atom Syndication Format&quot;">RFC4287</a>], or HTTP Link Header
   fields.  It is expected that resources discovered in the CoRE Link
   Format may also be made available in alternative formats on the
   greater Internet.  The CoRE Link Format is only expected to be
   supported in constrained networks and M2M systems.

   <a href="./rfc5988#section-5">Section&nbsp;5 of [RFC5988]</a> did not require an Internet media type for the
   defined link format, as it was defined to be carried in an HTTP
   header.  This specification thus defines the Internet media type
   'application/link-format' for the CoRE Link Format (see <a href="#section-7.3">Section 7.3</a>).
   Whereas the HTTP Link Header field depends on [<a href="./rfc2616" title="&quot;Hypertext Transfer Protocol -- HTTP/1.1&quot;">RFC2616</a>] for its
   encoding, the CoRE Link Format is encoded as UTF-8 [<a href="./rfc3629" title="&quot;UTF-8, a transformation format of ISO 10646&quot;">RFC3629</a>].  A
   decoder of the format is not expected to validate UTF-8 encoding (but
   is not prohibited from doing so) and doesn't need to perform any
   UTF-8 normalization.  UTF-8 data can be compared bitwise, which
   allows values to contain UTF-8 data without any added complexity for
   constrained nodes.

   The CoRE Link Format is equivalent to the [<a href="./rfc5988" title="&quot;Web Linking&quot;">RFC5988</a>] link format;
   however, the ABNF in the present specification is repeated with
   improvements to be compliant with [<a href="./rfc5234" title="&quot;Augmented BNF for Syntax Specifications: ABNF&quot;">RFC5234</a>] and includes new link
   parameters.  The link parameter "href" is reserved for use as a query
   parameter for filtering in this specification (see <a href="#section-4.1">Section 4.1</a>) and
   MUST NOT be defined as a link parameter.  As in [<a href="./rfc5988" title="&quot;Web Linking&quot;">RFC5988</a>], multiple
   link descriptions are separated by commas.  Note that commas can also
   occur in quoted strings and URIs but do not end a description.  In
   order to convert an HTTP Link Header field to this link format, first
   the "Link:" HTTP header is removed, any linear whitespace (LWS) is
   removed, the header value is converted to UTF-8, and any percent-
   encodings are decoded.

    Link            = link-value-list
    link-value-list = [ link-value *[ "," link-value ]]
    link-value     = "&lt;" URI-Reference "&gt;" *( ";" link-param )
    link-param     = ( ( "rel" "=" relation-types )
                   / ( "anchor" "=" DQUOTE URI-Reference DQUOTE )
                   / ( "rev" "=" relation-types )
                   / ( "hreflang" "=" Language-Tag )
                   / ( "media" "=" ( MediaDesc
                          / ( DQUOTE MediaDesc DQUOTE ) ) )
                   / ( "title" "=" quoted-string )
                   / ( "title*" "=" ext-value )
                   / ( "type" "=" ( media-type / quoted-mt ) )
                   / ( "rt" "=" relation-types )
                   / ( "if" "=" relation-types )
                   / ( "sz" "=" cardinal )
                   / ( link-extension ) )
    link-extension = ( parmname [ "=" ( ptoken / quoted-string ) ] )



<span class="grey">Shelby                       Standards Track                    [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


                   / ( ext-name-star "=" ext-value )
    ext-name-star  = parmname "*" ; reserved for <a href="./rfc2231">RFC-2231</a>-profiled
                                  ; extensions.  Whitespace NOT
                                  ; allowed in between.
    ptoken         = 1*ptokenchar
    ptokenchar     = "!" / "#" / "$" / "%" / "&amp;" / "'" / "("
                   / ")" / "*" / "+" / "-" / "." / "/" / DIGIT
                   / ":" / "&lt;" / "=" / "&gt;" / "?" / "@" / ALPHA
                   / "[" / "]" / "^" / "_" / "`" / "{" / "|"
                   / "}" / "~"
    media-type     = type-name "/" subtype-name
    quoted-mt      = DQUOTE media-type DQUOTE
    relation-types = relation-type
                   / DQUOTE relation-type *( 1*SP relation-type ) DQUOTE
    relation-type  = reg-rel-type / ext-rel-type
    reg-rel-type   = LOALPHA *( LOALPHA / DIGIT / "." / "-" )
    ext-rel-type   = URI
    cardinal       = "0" / ( %x31-39 *DIGIT )
    LOALPHA        = %x61-7A   ; a-z
    quoted-string  = &lt;defined in [<a href="./rfc2616" title="&quot;Hypertext Transfer Protocol -- HTTP/1.1&quot;">RFC2616</a>]&gt;
    URI            = &lt;defined in [<a href="./rfc3986" title="&quot;Uniform Resource Identifier (URI): Generic Syntax&quot;">RFC3986</a>]&gt;
    URI-Reference  = &lt;defined in [<a href="./rfc3986" title="&quot;Uniform Resource Identifier (URI): Generic Syntax&quot;">RFC3986</a>]&gt;
    type-name      = &lt;defined in [<a href="./rfc4288" title="&quot;Media Type Specifications and Registration Procedures&quot;">RFC4288</a>]&gt;
    subtype-name   = &lt;defined in [<a href="./rfc4288" title="&quot;Media Type Specifications and Registration Procedures&quot;">RFC4288</a>]&gt;
    MediaDesc      = &lt;defined in [<a href="#ref-W3C.HTML.4.01">W3C.HTML.4.01</a>]&gt;
    Language-Tag   = &lt;defined in [<a href="./rfc5646" title="&quot;Tags for Identifying Languages&quot;">RFC5646</a>]&gt;
    ext-value      = &lt;defined in [<a href="./rfc5987" title="&quot;Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters&quot;">RFC5987</a>]&gt;
    parmname       = &lt;defined in [<a href="./rfc5987" title="&quot;Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters&quot;">RFC5987</a>]&gt;

<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>.  Target and Context URIs</span>

   Each link conveys one target URI as a URI-reference inside angle
   brackets ("&lt;&gt;").  The context URI of a link (also called the base URI
   in [<a href="./rfc3986" title="&quot;Uniform Resource Identifier (URI): Generic Syntax&quot;">RFC3986</a>]) is determined by the following rules in this
   specification:

   (a)  The context URI is set to the anchor parameter, when specified.

   (b)  Origin of the target URI, when specified.

   (c)  Origin of the link format resource's base URI.

<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a>.  Link Relations</span>

   Since links in the CoRE Link Format are typically used to describe
   resources hosted by a server, the new relation type "hosts" is
   assumed in the absence of the relation parameter (see <a href="#section-7.2">Section 7.2</a>).
   The "hosts" relation type (from the verb "to host") indicates that



<span class="grey">Shelby                       Standards Track                    [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


   the target URI is a resource hosted by the server (i.e., server hosts
   resource) indicated by the context URI.  The target URI MUST be a
   relative URI of the context URI for this relation type.

   To express other relations, links can make use of any registered
   relation by including the relation parameter.  The context of a
   relation can be defined using the anchor parameter.  In this way,
   relations between resources hosted on a server or between hosted
   resources and external resources can be expressed.

<span class="h3"><a class="selflink" id="section-2.3" href="#section-2.3">2.3</a>.  Use of Anchors</span>

   As per <a href="./rfc5988#section-5.2">Section&nbsp;5.2 of [RFC5988]</a>, a link description MAY include an
   "anchor" parameter, in which case the context is the URI included in
   that attribute.  This is used to describe a relationship between two
   resources.  A consuming implementation can, however, choose to ignore
   such links.  It is not expected that all implementations will be able
   to derive useful information from explicitly anchored links.

<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>.  CoRE Link Attributes</span>

   The following CoRE-specific target attributes are defined in addition
   to those already defined in [<a href="./rfc5988" title="&quot;Web Linking&quot;">RFC5988</a>].  These attributes describe
   information useful in accessing the target link of the relation and,
   in some cases, can use the syntactical form of a URI.  Such a URI MAY
   be dereferenced (for instance, to obtain a description of the link
   relation), but that is not part of the protocol and MUST NOT be done
   automatically on link evaluation.  When the values of attributes are
   compared, they MUST be compared as strings.

<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>.  Resource Type 'rt' Attribute</span>

   The Resource Type 'rt' attribute is an opaque string used to assign
   an application-specific semantic type to a resource.  One can think
   of this as a noun describing the resource.  In the case of a
   temperature resource, this could be, e.g., an application-specific
   semantic type like "outdoor-temperature" or a URI referencing a
   specific concept in an ontology like
   "<a href="http://sweet.jpl.nasa.gov/2.0/phys.owl#Temperature">http://sweet.jpl.nasa.gov/2.0/phys.owl#Temperature</a>".  Multiple
   Resource Types MAY be included in the value of this parameter, each
   separated by a space, similar to the relation attribute.  The
   registry for Resource Type values is defined in <a href="#section-7.4">Section 7.4</a>.

   The Resource Type attribute is not meant to be used to assign a
   human-readable name to a resource.  The "title" attribute defined in
   [<a href="./rfc5988" title="&quot;Web Linking&quot;">RFC5988</a>] is meant for that purpose.  The Resource Type attribute
   MUST NOT appear more than once in a link.




<span class="grey">Shelby                       Standards Track                    [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>.  Interface Description 'if' Attribute</span>

   The Interface Description 'if' attribute is an opaque string used to
   provide a name or URI indicating a specific interface definition used
   to interact with the target resource.  One can think of this as
   describing verbs usable on a resource.  The Interface Description
   attribute is meant to describe the generic REST interface to interact
   with a resource or a set of resources.  It is expected that an
   Interface Description will be reused by different Resource Types.
   For example, the Resource Types "outdoor-temperature", "dew-point",
   and "rel-humidity" could all be accessible using the Interface
   Description "http://www.example.org/myapp.wadl#sensor".  Multiple
   Interface Descriptions MAY be included in the value of this
   parameter, each separated by a space, similar to the relation
   attribute.  The registry for Interface Description values is defined
   in <a href="#section-7.4">Section 7.4</a>.

   The Interface Description could be, for example, the URI of a Web
   Application Description Language (WADL) [<a href="#ref-WADL" title="&quot;Web Application Description Language (WADL)&quot;">WADL</a>] definition of the
   target resource "http://www.example.org/myapp.wadl#sensor", a URN
   indicating the type of interface to the resource "urn:myapp:sensor",
   or an application-specific name "sensor".  The Interface Description
   attribute MUST NOT appear more than once in a link.

<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>.  Maximum Size Estimate 'sz' Attribute</span>

   The maximum size estimate attribute 'sz' gives an indication of the
   maximum size of the resource representation returned by performing a
   GET on the target URI.  For links to CoAP resources, this attribute
   is not expected to be included for small resources that can
   comfortably be carried in a single Maximum Transmission Unit (MTU)
   but SHOULD be included for resources larger than that.  The maximum
   size estimate attribute MUST NOT appear more than once in a link.

   Note that there is no defined upper limit to the value of the 'sz'
   attributes.  Implementations MUST be prepared to accept large values.
   One implementation strategy is to convert any value larger than a
   reasonable size limit for this implementation to a special value
   "Big", which in further processing would indicate that a size value
   was given that was so big that it cannot be processed by this
   implementation.

<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>.  Well-Known Interface</span>

   Resource discovery in CoRE is accomplished through the use of a well-
   known resource URI that returns a list of links about resources
   hosted by that server and other link relations.  Well-known resources




<span class="grey">Shelby                       Standards Track                   [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


   have a path component that begins with "/.well-known/" as specified
   in [<a href="./rfc5785" title="&quot;Defining Well-Known Uniform Resource Identifiers (URIs)&quot;">RFC5785</a>].  This specification defines a new well-known resource
   for CoRE Resource Discovery: "/.well-known/core".

   A server implementing this specification MUST support this resource
   on the default port appropriate for the protocol for the purpose of
   resource discovery.  It is, however, up to the application which
   links are included and how they are organized.  The resource
   "/.well-known/core" is meant to be used to return links to the entry
   points of resource interfaces on a server.  More sophisticated link
   organization can be achieved by including links to CoRE Link Format
   resources located elsewhere on the server, for example, to achieve an
   index.  In the absence of any links, a zero-length payload is
   returned.  The resource representation of this resource MUST be the
   CoRE Link Format described in <a href="#section-2">Section 2</a>.

   The CoRE resource discovery interface supports the following
   interactions:

   o  Performing a GET on "/.well-known/core" to the default port
      returns a set of links available from the server (if any) in the
      CoRE Link Format.  These links might describe resources hosted on
      that server or on other servers or express other kinds of link
      relations as described in <a href="#section-2">Section 2</a>.

   o  Filtering may be performed on any of the link format attributes
      using a query string as specified in <a href="#section-4.1">Section 4.1</a>.  For example,
      [GET /.well-known/core?rt=temperature-c] would request resources
      with the Resource Type temperature-c.  A server is not, however,
      required to support filtering.

   o  More capable servers such as proxies could support a resource
      directory by requesting the resource descriptions of other end-
      points or allowing servers to POST requests to "/.well-known/
      core".  The details of such resource directory functionality is,
      however, out of the scope of this specification and is expected to
      be specified separately.














<span class="grey">Shelby                       Standards Track                   [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>.  Query Filtering</span>

   A server implementing this specification MAY recognize the query part
   of a resource discovery URI as a filter on the resources to be
   returned.  The path and query components together should conform to
   the following level-4 URI Template [<a href="./rfc6570" title="&quot;URI Template&quot;">RFC6570</a>]:

       /.well-known/core{?search*}

   where the variable "search" is a 1-element list that has a single
   name/value pair, where

   o  name is either "href", a link-param name defined in this
      specification, or any other link-extension name, and

   o  value is either a Complete Value String that does not end in an
      "*" (%2A), or a Prefix Value String followed by an "*" (%2A).

   The search name "href" refers to the URI-reference between the "&lt;"
   and "&gt;" characters of a link.  Both Value Strings match a target
   attribute only if it exists.  Value Strings are percent-decoded
   (<a href="./rfc3986#section-2.1">[RFC3986], Section&nbsp;2.1</a>) before matching; similarly, any target
   attributes notated as quoted-string are interpreted as defined in
   <a href="./rfc2616#section-2.2">Section&nbsp;2.2 of [RFC2616]</a>.  After these steps, a Complete Value String
   matches a target attribute if it is bitwise identical.  A Prefix
   Value String matches a target attribute if it is a bitwise prefix of
   the target attribute (where any string is a prefix of itself).  Empty
   Prefix Value Strings are allowed; by the definition above, they match
   any target attribute that does exist.  Note that relation-type target
   attributes can contain multiple values, and each value MUST be
   treated as a separate target attribute when matching.

   It is not expected that very constrained nodes support filtering.
   Implementations not supporting filtering MUST simply ignore the query
   string and return the whole resource for unicast requests.

   When using a transfer protocol like the Constrained Application
   Protocol (CoAP) that supports multicast requests, special care needs
   to be taken.  A multicast request with a query string SHOULD NOT be
   responded to if filtering is not supported or if the filter does not
   match (to avoid a needless response storm).  The exception is in
   cases where the IP stack interface is not able to indicate that the
   destination address was multicast.








<span class="grey">Shelby                       Standards Track                   [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


   The following are examples of valid query URIs:

   o  ?href=/foo matches a link-value that is anchored at /foo

   o  ?href=/foo* matches a link-value that is anchored at a URI that
      starts with /foo

   o  ?foo=bar matches a link-value that has a target attribute named
      foo with the exact value bar

   o  ?foo=bar* matches a link-value that has a target attribute named
      foo, the value of which starts with bar, e.g., bar or barley

   o  ?foo=* matches a link-value that has a target attribute named foo

<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>.  Examples</span>

   A few examples of typical link descriptions in this format follows.
   Multiple resource descriptions in a representation are separated by
   commas.  Linefeeds are also included in these examples for
   readability.  Although the following examples use CoAP response
   codes, the examples are applicable to HTTP as well (the corresponding
   response code would be 200 OK).

   This example includes links to two different sensors sharing the same
   Interface Description.  Note that the default relation type for this
   link format is "hosts" in links with no rel= target attribute.  Thus,
   the links in this example tell that the Origin server from which
   /.well-known/core was requested (the context) hosts the resources
   /sensors/temp and /sensors/light (each a target).

   REQ: GET /.well-known/core

   RES: 2.05 Content
   &lt;/sensors/temp&gt;;if="sensor",
   &lt;/sensors/light&gt;;if="sensor"

   Without the linefeeds inserted here for readability, the format
   actually looks as follows.

   &lt;/sensors/temp&gt;;if="sensor",&lt;/sensors/light&gt;;if="sensor"

   This example arranges link descriptions hierarchically, with the
   entry point including a link to a sub-resource containing links about
   the sensors.






<span class="grey">Shelby                       Standards Track                   [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


   REQ: GET /.well-known/core

   RES: 2.05 Content
   &lt;/sensors&gt;;ct=40

   REQ: GET /sensors

   RES: 2.05 Content
   &lt;/sensors/temp&gt;;rt="temperature-c";if="sensor",
   &lt;/sensors/light&gt;;rt="light-lux";if="sensor"

   An example query filter may look like:

   REQ: GET /.well-known/core?rt=light-lux

   RES: 2.05 Content
   &lt;/sensors/light&gt;;rt="light-lux";if="sensor"

   Note that relation-type attributes like 'rt', 'if', and 'rel' can
   have multiple values separated by spaces.  A query filter parameter
   can match any one of those values, as in this example:

   REQ: GET /.well-known/core?rt=light-lux

   RES: 2.05 Content
   &lt;/sensors/light&gt;;rt="light-lux core.sen-light";if="sensor"

   This example shows the use of an "anchor" attribute to relate the
   temperature sensor resource to an external description and to an
   alternative URI.

   REQ: GET /.well-known/core

   RES: 2.05 Content
   &lt;/sensors&gt;;ct=40;title="Sensor Index",
   &lt;/sensors/temp&gt;;rt="temperature-c";if="sensor",
   &lt;/sensors/light&gt;;rt="light-lux";if="sensor",
   &lt;http://www.example.com/sensors/t123&gt;;anchor="/sensors/temp"
   ;rel="describedby",
   &lt;/t&gt;;anchor="/sensors/temp";rel="alternate"











<span class="grey">Shelby                       Standards Track                   [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


   If a client is interested in finding relations about a particular
   resource, it can perform a query on the anchor parameter:

   REQ: GET /.well-known/core?anchor=/sensors/temp

   RES: 2.05 Content
   &lt;http://www.example.com/sensors/temp123&gt;;anchor="/sensors/temp"
   ;rel="describedby",
   &lt;/t&gt;;anchor="/sensors/temp";rel="alternate"

   The following example shows a large firmware resource with a size
   attribute.  The consumer of this link would use the 'sz' attribute to
   determine if the resource representation is too large and if block
   transfer would be required to request it.  In this case, a client
   with only a 64 KiB flash might only support a 16-bit integer for
   storing the 'sz' attribute.  Thus, a special flag or value should be
   used to indicate "Big" (larger than 64 KiB).

   REQ: GET /.well-known/core?rt=firmware

   RES: 2.05 Content
   &lt;/firmware/v2.1&gt;;rt="firmware";sz=262144

<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>.  Security Considerations</span>

   This specification has the same security considerations as described
   in <a href="./rfc5988#section-7">Section&nbsp;7 of [RFC5988]</a>.  The "/.well-known/core" resource MAY be
   protected, e.g., using Datagram Transport Layer Security (DTLS) when
   hosted on a CoAP server as per [<a href="#ref-COAP" title="&quot;Constrained Application Protocol (CoAP)&quot;">COAP</a>], Section 9.1.

   Some servers might provide resource discovery services to a mix of
   clients that are trusted to different levels.  For example, a
   lighting control system might allow any client to read state
   variables, but only certain clients to write state (turn lights on or
   off).  Servers that have authentication and authorization features
   SHOULD support authentication features of the underlying transport
   protocols (HTTP or DTLS/TLS) and allow servers to return different
   lists of links based on a client's identity and authorization.  While
   such servers might not return all links to all requesters, not
   providing the link does not, by itself, control access to the
   relevant resource -- a bad actor could know or guess the right URIs.
   Servers can also lie about the resources available.  If it is
   important for a client to only get information from a known source,
   then that source needs to be authenticated.







<span class="grey">Shelby                       Standards Track                   [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


   Multicast requests using CoAP for the well-known link-format
   resources could be used to perform denial of service on a constrained
   network.  A multicast request SHOULD only be accepted if the request
   is sufficiently authenticated and secured using, e.g., IPsec or an
   appropriate object security mechanism.

   CoRE Link Format parsers should be aware that a link description may
   be cyclical, i.e., contain a link to itself.  These cyclical links
   could be direct or indirect (i.e., through referenced link
   resources).  Care should be taken when parsing link descriptions and
   accessing cyclical links.

<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>.  IANA Considerations</span>

<span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a>.  Well-Known 'core' URI</span>

   This memo registers the 'core' well-known URI in the Well-Known URIs
   registry as defined by [<a href="./rfc5785" title="&quot;Defining Well-Known Uniform Resource Identifiers (URIs)&quot;">RFC5785</a>].

   URI suffix: core

   Change controller: IETF

   Specification document(s): <a href="./rfc6690">RFC 6690</a>

   Related information: None

<span class="h3"><a class="selflink" id="section-7.2" href="#section-7.2">7.2</a>.  New 'hosts' Relation Type</span>

   This memo registers the new "hosts" Web Linking relation type as per
   [<a href="./rfc5988" title="&quot;Web Linking&quot;">RFC5988</a>].

   Relation Name: hosts

   Description: Refers to a resource hosted by the server indicated by
   the link context.

   Reference: <a href="./rfc6690">RFC 6690</a>

   Notes: This relation is used in CoRE where links are retrieved as a
   "/.well-known/core" resource representation and is the default
   relation type in the CoRE Link Format.

   Application Data: None







<span class="grey">Shelby                       Standards Track                   [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


<span class="h3"><a class="selflink" id="section-7.3" href="#section-7.3">7.3</a>.  New 'link-format' Internet Media Type</span>

   This memo registers the a new Internet media type for the CoRE Link
   Format, 'application/link-format'.

   Type name: application

   Subtype name: link-format

   Required parameters: None

   Optional parameters: None

   Encoding considerations: Binary data (UTF-8)

   Security considerations:

   Multicast requests using CoAP for the well-known link-format
   resources could be used to perform denial of service on a constrained
   network.  A multicast request SHOULD only be accepted if the request
   is sufficiently authenticated and secured using, e.g., IPsec or an
   appropriate object security mechanism.

   CoRE Link Format parsers should be aware that a link description may
   be cyclical, i.e., contain a link to itself.  These cyclical links
   could be direct or indirect (i.e., through referenced link
   resources).  Care should be taken when parsing link descriptions and
   accessing cyclical links.

   Interoperability considerations: None

   Published specification: <a href="./rfc6690">RFC 6690</a>

   Applications that use this media type: CoAP server and client
   implementations for resource discovery and HTTP applications that use
   the link-format as a payload.

   Additional information:

   Magic number(s):

   File extension(s): *.wlnk

   Macintosh file type code(s):

   Intended usage: COMMON

   Restrictions on usage: None



<span class="grey">Shelby                       Standards Track                   [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


   Author: CoRE WG

   Change controller: IETF

<span class="h3"><a class="selflink" id="section-7.4" href="#section-7.4">7.4</a>.  Constrained RESTful Environments (CoRE) Parameters Registry</span>

   This specification establishes a new Constrained RESTful Environments
   (CoRE) Parameters registry, which contains two new sub-registries of
   Link Target Attribute values (defined in [<a href="./rfc5988" title="&quot;Web Linking&quot;">RFC5988</a>]), one for Resource
   Type (rt=) Link Target Attribute values and the other for Interface
   Description (if=) Link Target Attribute values.  No initial entries
   are defined by this specification for either sub-registry.

   For both sub-registries, values starting with the characters "core"
   are registered using the IETF Review registration policy [<a href="./rfc5226" title="">RFC5226</a>].
   All other values are registered using the Specification Required
   policy, which requires review by a designated expert appointed by the
   IESG or their delegate.

   The designated expert will enforce the following requirements:

   o  Registration values MUST be related to the intended purpose of
      these attributes as described in <a href="#section-3">Section 3</a>.

   o  Registered values MUST conform to the ABNF reg-rel-type definition
      of <a href="#section-2">Section 2</a>, meaning that the value starts with a lowercase
      alphabetic character, followed by a sequence of lowercase
      alphabetic, numeric, ".", or "-" characters, and contains no white
      space.

   o  It is recommended that the period "." character be used for
      dividing name segments and that the dash "-" character be used for
      making a segment more readable.  Example Interface Description
      values might be "core.batch" and "core.link-batch".

   o  URIs are reserved for free use as extension values for these
      attributes and MUST NOT be registered.

   Registration requests consist of the completed registration template
   below, with the reference pointing to the required specification.  To
   allow for the allocation of values prior to publication, the
   designated expert may approve registration once they are satisfied
   that a specification will be published.

   Note that Link Target Attribute Values can be registered by third
   parties if the Designated Expert determines that an unregistered Link
   Target Attribute Value is widely deployed and not likely to be
   registered in a timely manner.



<span class="grey">Shelby                       Standards Track                   [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


   The registration template for both sub-registries is:

   o  Attribute Value:

   o  Description:

   o  Reference:

   o  Notes: [optional]

   Registration requests should be sent to the core-parameters@ietf.org
   mailing list, marked clearly in the subject line (e.g., "NEW RESOURCE
   TYPE - example" to register an "example" relation type or "NEW
   INTERFACE DESCRIPTION - example" to register an "example" Interface
   Description).

   Within at most 14 days of the request, the Designated Expert(s) will
   either approve or deny the registration request, communicating this
   decision to the review list and IANA.  Denials should include an
   explanation and, if applicable, suggestions as to how to make the
   request successful.

   Decisions (or lack thereof) made by the Designated Expert can be
   first appealed to Application Area Directors (contactable using the
   app-ads@tools.ietf.org email address or directly by looking up their
   email addresses on <a href="http://www.iesg.org/">http://www.iesg.org/</a> website) and, if the
   appellant is not satisfied with the response, to the full IESG (using
   the iesg@ietf.org mailing list).

<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>.  Acknowledgments</span>

   Special thanks to Peter Bigot, who has made a considerable number of
   reviews and text contributions that greatly improved the document.
   In particular, Peter is responsible for early improvements to the
   ABNF descriptions and the idea for a new 'hosts' relation type.

   Thanks to Mark Nottingham and Eran Hammer-Lahav for the discussions
   and ideas that led to this document, and to Carsten Bormann, Martin
   Thomson, Alexey Melnikov, Julian Reschke, Joel Halpern, Richard
   Barnes, Barry Leiba, and Peter Saint-Andre for extensive comments and
   contributions that improved the text.

   Thanks to Michael Stuber, Richard Kelsey, Cullen Jennings, Guido
   Moritz, Peter Van Der Stok, Adriano Pezzuto, Lisa Dussealt, Alexey
   Melnikov, Gilbert Clark, Salvatore Loreto, Petri Mutka, Szymon Sasin,
   Robert Quattlebaum, Robert Cragie, Angelo Castellani, Tom Herbst, Ed
   Beroset, Gilman Tolle, Robby Simpson, Colin O'Flynn, and David Ryan
   for helpful comments and discussions that have shaped the document.



<span class="grey">Shelby                       Standards Track                   [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>.  References</span>

<span class="h3"><a class="selflink" id="section-9.1" href="#section-9.1">9.1</a>.  Normative References</span>

   [<a id="ref-RFC2119">RFC2119</a>]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.

   [<a id="ref-RFC2616">RFC2616</a>]  Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
              Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
              Transfer Protocol -- HTTP/1.1", <a href="./rfc2616">RFC 2616</a>, June 1999.

   [<a id="ref-RFC3629">RFC3629</a>]  Yergeau, F., "UTF-8, a transformation format of ISO
              10646", STD 63, <a href="./rfc3629">RFC 3629</a>, November 2003.

   [<a id="ref-RFC3986">RFC3986</a>]  Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
              Resource Identifier (URI): Generic Syntax", STD 66,
              <a href="./rfc3986">RFC 3986</a>, January 2005.

   [<a id="ref-RFC4288">RFC4288</a>]  Freed, N. and J. Klensin, "Media Type Specifications and
              Registration Procedures", <a href="https://www.rfc-editor.org/bcp/bcp13">BCP 13</a>, <a href="./rfc4288">RFC 4288</a>, December 2005.

   [<a id="ref-RFC5226">RFC5226</a>]  Narten, T. and H. Alvestrand, "Guidelines for Writing an
              IANA Considerations Section in RFCs", <a href="https://www.rfc-editor.org/bcp/bcp26">BCP 26</a>, <a href="./rfc5226">RFC 5226</a>,
              May 2008.

   [<a id="ref-RFC5234">RFC5234</a>]  Crocker, D. and P. Overell, "Augmented BNF for Syntax
              Specifications: ABNF", STD 68, <a href="./rfc5234">RFC 5234</a>, January 2008.

   [<a id="ref-RFC5646">RFC5646</a>]  Phillips, A. and M. Davis, "Tags for Identifying
              Languages", <a href="https://www.rfc-editor.org/bcp/bcp47">BCP 47</a>, <a href="./rfc5646">RFC 5646</a>, September 2009.

   [<a id="ref-RFC5987">RFC5987</a>]  Reschke, J., "Character Set and Language Encoding for
              Hypertext Transfer Protocol (HTTP) Header Field
              Parameters", <a href="./rfc5987">RFC 5987</a>, August 2010.

   [<a id="ref-RFC5988">RFC5988</a>]  Nottingham, M., "Web Linking", <a href="./rfc5988">RFC 5988</a>, October 2010.

   [<a id="ref-RFC6570">RFC6570</a>]  Gregorio, J., Fielding, R., Hadley, M., Nottingham, M.,
              and D. Orchard, "URI Template", <a href="./rfc6570">RFC 6570</a>, March 2012.

<span class="h3"><a class="selflink" id="section-9.2" href="#section-9.2">9.2</a>.  Informative References</span>

   [<a id="ref-COAP">COAP</a>]     Shelby, Z., Hartke, K., Bormann, C., and B. Frank,
              "Constrained Application Protocol (CoAP)", Work in
              Progress, July 2012.






<span class="grey">Shelby                       Standards Track                   [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


   [<a id="ref-REST">REST</a>]     Fielding, R., "Architectural Styles and the Design of
              Network-based Software Architectures", 2000,
              &lt;<a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm">http://www.ics.uci.edu/~fielding/pubs/dissertation/</a>
              <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm">top.htm</a>&gt;.

   [<a id="ref-RFC1034">RFC1034</a>]  Mockapetris, P., "Domain names - concepts and facilities",
              STD 13, <a href="./rfc1034">RFC 1034</a>, November 1987.

   [<a id="ref-RFC1035">RFC1035</a>]  Mockapetris, P., "Domain names - implementation and
              specification", STD 13, <a href="./rfc1035">RFC 1035</a>, November 1987.

   [<a id="ref-RFC2045">RFC2045</a>]  Freed, N. and N. Borenstein, "Multipurpose Internet Mail
              Extensions (MIME) Part One: Format of Internet Message
              Bodies", <a href="./rfc2045">RFC 2045</a>, November 1996.

   [<a id="ref-RFC2231">RFC2231</a>]  Freed, N. and K. Moore, "MIME Parameter Value and Encoded
              Word Extensions: Character Sets, Languages, and
              Continuations", <a href="./rfc2231">RFC 2231</a>, November 1997.

   [<a id="ref-RFC4287">RFC4287</a>]  Nottingham, M., Ed. and R. Sayre, Ed., "The Atom
              Syndication Format", <a href="./rfc4287">RFC 4287</a>, December 2005.

   [<a id="ref-RFC4919">RFC4919</a>]  Kushalnagar, N., Montenegro, G., and C. Schumacher, "IPv6
              over Low-Power Wireless Personal Area Networks (6LoWPANs):
              Overview, Assumptions, Problem Statement, and Goals",
              <a href="./rfc4919">RFC 4919</a>, August 2007.

   [<a id="ref-RFC5785">RFC5785</a>]  Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known
              Uniform Resource Identifiers (URIs)", <a href="./rfc5785">RFC 5785</a>,
              April 2010.

   [<a id="ref-RFC6454">RFC6454</a>]  Barth, A., "The Web Origin Concept", <a href="./rfc6454">RFC 6454</a>,
              December 2011.

   [<a id="ref-W3C.HTML.4.01">W3C.HTML.4.01</a>]
              Raggett, D., Le Hors, A., and I. Jacobs, "HTML 4.01
              Specification", World Wide Web Consortium
              Recommendation REC-html401-19991224, December 1999,
              &lt;<a href="http://www.w3.org/TR/1999/REC-html401-19991224">http://www.w3.org/TR/1999/REC-html401-19991224</a>&gt;.

   [<a id="ref-WADL">WADL</a>]     Hadley, M., "Web Application Description Language (WADL)",
              2009, &lt;<a href="http://java.net/projects/wadl/sources/svn/content/trunk/www/wadl20090202.pdf">http://java.net/projects/wadl/sources/svn/content/</a>
              <a href="http://java.net/projects/wadl/sources/svn/content/trunk/www/wadl20090202.pdf">trunk/www/wadl20090202.pdf</a>&gt;.








<span class="grey">Shelby                       Standards Track                   [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="./rfc6690">RFC 6690</a>                    CoRE Link Format                 August 2012</span>


Author's Address

   Zach Shelby
   Sensinode
   Kidekuja 2
   Vuokatti  88600
   Finland

   Phone: +358407796297
   EMail: zach@sensinode.com









































Shelby                       Standards Track                   [Page 22]
</pre>

</body>
</html>

